﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace SoulKeeper
{
	public class Button:Sprite
	{
        /// <summary>
        /// Enum que "controla"/"contém" as animações
        /// </summary>
        public enum animIndexes { onThis, offThis};
        
        public Button(Texture2D texture, Vector2 position, GameWindow Window):
            base(texture, Window)
            
        {
            controlAnimations();

            this.position = position;
            IsAffectedByGravity = false;

        }
        public override void Update(GameTime gameTime)
        {
            Animation currentAnim = this.getAnimation();
        }
        public void controlAnimations()
        {
            //offThis ( IDLE )//

            Animation offThis = new Animation();
            offThis.frames = 1;
            offThis.fps = 1;
            offThis.Y = 0;
            offThis.width = 480;
            offThis.height = 50;

            //Selected//
            Animation onThis = new Animation();
            onThis.frames = 1;
            onThis.fps = 1;
            onThis.Y = 77;
            onThis.width = 480;
            onThis.height = 50;

            this.animations.Add(onThis);
            this.animations.Add(offThis);

            this.setAnimationIndex((int)Button.animIndexes.offThis);
            this.BoundingBox = new Rectangle((int)position.X, (int)position.Y, offThis.width, offThis.height);
            
               
          

        }
	}
}
